package io.gitee.zicai.service.provider.controller

import io.gitee.zicai.service.provider.service.HelloService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/**
 * HelloController
 * @author zicai
 * @since 2019-12-05
 */
@RestController
@RequestMapping("/hello")
open class HelloController {

    @Autowired
    private lateinit var helloService: HelloService

    @GetMapping("/m/{msg}")
    open fun hello(@PathVariable msg: String) = helloService.hello(msg)

    @GetMapping("/config")
    open fun config() = helloService.config()

}